import request from '@/utils/request'

// 查询经营户人员列表
export function listBusinessworker(query) {
  return request({
    url: '/ledger/businessworker/list',
    method: 'get',
    params: query
  })
}

// 查询经营户人员详细
export function getBusinessworker(id) {
  return request({
    url: '/ledger/businessworker/' + id,
    method: 'get'
  })
}

// 新增经营户人员
export function addBusinessworker(data) {
  return request({
    url: '/ledger/businessworker',
    method: 'post',
    data: data
  })
}

// 修改经营户人员
export function updateBusinessworker(data) {
  return request({
    url: '/ledger/businessworker',
    method: 'put',
    data: data
  })
}

// 删除经营户人员
export function delBusinessworker(id) {
  return request({
    url: '/ledger/businessworker/' + id,
    method: 'delete'
  })
}

// 导出经营户人员
export function exportBusinessworker(query) {
  return request({
    url: '/ledger/businessworker/export',
    method: 'get',
    params: query
  })
}

// 下载人员导入模板
export function importTemplate() {
  return request({
    url: '/ledger/businessworker/importTemplate',
    method: 'get'
  })
}
